home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / RIncludes / LocationManager.r < prev    next >
Encoding:
Text File  |  2000-04-12  |  6.2 KB  |  169 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        LocationManager.r
  3.  
  4.      Contains:    LocationManager (manages groups of settings)
  5.  
  6.      Version:    Technology:    Mac OS 8
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    © 1995-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17.  
  18. #ifndef __LOCATIONMANAGER_R__
  19. #define __LOCATIONMANAGER_R__
  20.  
  21. #ifndef __CONDITIONALMACROS_R__
  22. #include "ConditionalMacros.r"
  23. #endif
  24.  
  25. /* Location Manager API Support -------------------------------------------------------------------- */
  26. /* A Location Token uniquely identifies a Location on a machine... */
  27.  
  28. #define kALMNoLocationToken             (-1)                /*  ALMToken of "off" Location... */
  29. #define kALMLocationNameMaxLen             31                    /*  name (actually imposed by file system)...  */
  30. #define kALMNoLocationIndex             (-1)                /*  index for the "off" Location (kALMNoLocationToken)...  */
  31.  
  32. /* Returned from ALMConfirmName... */
  33. #define kALMConfirmRename                 1
  34. #define kALMConfirmReplace                 2
  35.  
  36. /* ALMConfirmName dialog item numbers for use in callbacks (ALM 2.0)... */
  37.  
  38. #define kALMDuplicateRenameButton         1                    /*  if Window refcon is kALMDuplicateDialogRefCon...  */
  39. #define kALMDuplicateReplaceButton         2
  40. #define kALMDuplicateCancelButton         3
  41. #define kALMDuplicatePromptText         5
  42.  
  43. #define kALMRenameRenameButton             1                    /*  if Window refcon is kALMRenameDialogRefCon...  */
  44. #define kALMRenameCancelButton             2
  45. #define kALMRenameEditText                 3
  46. #define kALMRenamePromptText             4
  47.  
  48. /* Refcons of two windows in ALMConfirmName (ALM 2.0)... */
  49.  
  50. #define kALMDuplicateDialogRefCon         'dupl'
  51. #define kALMRenameDialogRefCon             'rnam'
  52.  
  53. /* Callback routine for Location awareness (mimics AppleEvents) in non-application code... */
  54.  
  55. /* Notification AppleEvents sent to apps/registered code...  */
  56. #define kAELocationChangedNoticeKey     'walk'                /*  Current Location changed...  */
  57. #define kAELocationRescanNoticeKey         'trip'                /*  Location created/renamed/deleted...  */
  58.  
  59. /* ALMSwitchToLocation masks... */
  60. #define kALMDefaultSwitchFlags             0x00000000            /*  No special action to take...  */
  61. #define kALMDontShowStatusWindow         0x00000001            /*  Suppress "switching" window...  */
  62. #define kALMSignalViaAE                 0x00000002            /*  Switch by sending Finder AppleEvent...  */
  63.  
  64. /* Parameters for Get/Put/Merge Location calls... */
  65.  
  66. #define kALMAddAllOnSimple                 0                    /*  Add all single-instance, non-action modules...  */
  67. #define kALMAddAllOff                     (-1)                /*  Add all modules but turn them off...  */
  68.  
  69. /* Item numbers for use in Get/Put/Merge Location filters... */
  70.  
  71. #define kALMLocationSelectButton         1
  72. #define kALMLocationCancelButton         2
  73. #define kALMLocationBalloonHelp         3
  74. #define kALMLocationLocationList         7
  75. #define kALMLocationLocationNameEdit     10
  76. #define kALMLocationPromptText             11
  77.  
  78. #define kALMLocationSaveButton             1
  79. /* Location Manager Module API Support ------------------------------------------------------------- */
  80.  
  81. /* ALMGetScriptInfo stuff... */
  82.  
  83. #define kALMScriptInfoVersion             2                    /*  Customarily put in resource for localization...  */
  84. /*
  85.    Alternate form of ScriptInfo is easier to localize in resources; it is used extensively in
  86.    samples and internally, so....
  87. */
  88. #define kALMAltScriptManagerInfoRsrcType  'trip'
  89. #define kALMAltScriptManagerInfoRsrcID     0
  90.  
  91. type kALMAltScriptManagerInfoRsrcType {
  92.     integer;    // version = kALMScriptInfoVersion
  93.     integer;    // scriptCode (eg. smRoman)
  94.     integer;     // regionCode (eg. versUS)
  95.     integer;     // langCode (eg. langEnglish)
  96.     integer;    // fontSize
  97.     pstring;    // fontName
  98. };
  99. /* Reboot information used on ALMSetCurrent (input/output parameter)... */
  100. #define kALMNoChange                     0
  101. #define kALMAvailableNow                 1
  102. #define kALMFinderRestart                 2
  103. #define kALMProcesses                     3
  104. #define kALMExtensions                     4
  105. #define kALMWarmBoot                     5
  106. #define kALMColdBoot                     6
  107. #define kALMShutdown                     7
  108.  
  109. /*
  110.    File types and signatures...
  111.    Note: auto-routing of modules will not be supported for 'thng' files...
  112. */
  113.  
  114. #define kALMFileCreator                 'fall'                /*  Creator of Location Manager files...  */
  115. #define kALMComponentModuleFileType     'thng'                /*  Type of a Component Manager Module file [v1.0]...  */
  116. #define kALMComponentStateModuleFileType  'almn'            /*  Type of a CM 'state' Module file...  */
  117. #define kALMComponentActionModuleFileType  'almb'            /*  Type of a CM 'action' Module file...  */
  118. #define kALMCFMStateModuleFileType         'almm'                /*  Type of a CFM 'state' Module file...  */
  119. #define kALMCFMActionModuleFileType     'alma'                /*  Type of a CFM 'action' Module file...  */
  120.  
  121. /* Component Manager 'thng' info... */
  122.  
  123. #define kALMComponentRsrcType             'thng'
  124. #define kALMComponentType                 'walk'
  125.  
  126. /* CFM Modules require a bit of information (replacing some of the 'thng' resource)... */
  127.  
  128. #define kALMModuleInfoRsrcType             'walk'
  129. #define kALMModuleInfoOriginalVersion     0
  130.  
  131. type kALMModuleInfoRsrcType {
  132.     switch {
  133.         case Original:
  134.             key longint = kALMModuleInfoOriginalVersion;
  135.             literal longint;         // Subtype
  136.             literal longint;         // Manufacturer
  137.             unsigned hex longint;     // Flags
  138.     };
  139. };
  140. /* These masks apply to the "Flags" field in the 'thng' or 'walk' resource... */
  141.  
  142. #define kALMMultiplePerLocation         0x00000001            /*  Module can be added more than once to a Location...  */
  143. #define kALMDescriptionGetsStale         0x00000002            /*  Descriptions may change though the setting didn't...   */
  144.  
  145. /* Misc stuff for older implementations ------------------------------------------------------------ */
  146.  
  147. /* Old error codes for compatibility - new names are in Errors interface... */
  148. #if OLDROUTINENAMES
  149. #define ALMInternalErr                     (-30049)            /*  use kALMInternalErr  */
  150. #define ALMLocationNotFound             (-30048)            /*  use kALMLocationNotFoundErr  */
  151. #define ALMNoSuchModuleErr                 (-30047)            /*  use kALMNoSuchModuleErr  */
  152. #define ALMModuleCommunicationErr         (-30046)            /*  use kALMModuleCommunicationErr  */
  153. #define ALMDuplicateModuleErr             (-30045)            /*  use kALMDuplicateModuleErr  */
  154. #define ALMInstallationErr                 (-30044)            /*  use kALMInstallationErr  */
  155. #define ALMDeferSwitchErr                 (-30043)            /*  use kALMDeferSwitchErr  */
  156.  
  157. /* Old ALMConfirmName constants... */
  158.  
  159. #define ALMConfirmRenameConfig             1
  160. #define ALMConfirmReplaceConfig         2
  161.  
  162. /* Old AppleEvents... */
  163.  
  164. #define kAELocationNotice                 'walk'
  165. #endif
  166.  
  167. #endif /* __LOCATIONMANAGER_R__ */
  168.  
  169.